Skip to content

Support type alias as Literal #8014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 26, 2019
Merged

Support type alias as Literal #8014

merged 5 commits into from
Nov 26, 2019

Conversation

TH3CHARLie
Copy link
Collaborator

@TH3CHARLie TH3CHARLie commented Nov 26, 2019

resolves #7996

I'm not very sure about how effective the current testcase is, suggestions are welcomed.

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Generally looks good, I have few comments here.

@TH3CHARLie
Copy link
Collaborator Author

Updated:

  • reveal_type() for all declared vars
  • rename original test to testAliasAsLiteral (I forgot to change the name when I decided to exclude the enum test)
  • add enum testcase testAliasForEnumTypeAsLiteral
  • update lookup_qualified logic, remove TODO in visit_member_expr

Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Couple minor suggestions, otherwise looks good.

@ilevkivskyi ilevkivskyi merged commit 596cde6 into python:master Nov 26, 2019
@TH3CHARLie TH3CHARLie deleted the fix-alias-as-literal branch November 27, 2019 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Variant of alias for enum type cannot be used as Literal
2 participants